wowwikifandomcom-20200223-history
Useful macros
=2.0 Macro Guide= Portions of this guide can also be found on the the WoW forums: Neuro's Macro Guide for WoW 2.0. Ongoing discussion and development changes from Blizzard can be found here: 2.0 Changes - Concise List (New) Changes In WoW 2.0 a new macro system is being introduced to wow with new restrictions and also possibilities. First of all: In TBC macros won't be able to target Units or cast spells using the scripting interface when initiating. This means that a macro like the one below: /script if (UnitMana("player")>54) then CastSpellByName("Heroic Strike"); end won't work anymore. CastSpellByName won't be able to be called in combat, and TargetUnit, TargetByName or other similar functions won't be accessable at all both in and out of combat. Several other functions have also been disabled when the character is in combat. I don't remember all of them off the top of my head, but here are some of them, namely pet macros: PetAttack() PetFollow() PetPassiveMode() PetAggresiveMode() SpellStopCasting() Switching action bars in combat won't be programatically possible without user interaction. These are getting replaced with slash commands that you can use, aka. the slash commands will work in TBC. Syntax /command option action; option1,option2 action The new command format for '/cast' is: /cast [] ; [] ; [] ; ... Some additional tricks you can do with the options: You can add 'no' to the beginning of any option (except target) to invert it, i.e. 'nocombat' will only work if you are NOT in combat. Separating options with a comma ',' will act like an 'and' statement; if both options are true, it executes. Separating options with a slash '/' will act like an 'or' statement; if either option is true, it executes. Selecting the '?' Icon in the Macro Editor will force the macro to present the icon of the current spell that spell feedback is being given for. Macro Feedback * # and - are comment prefixes in macros * A macro that starts with # show shows feedback for that spell, # show none shows no feedback. * Otherwise the first /cast, /castrandom, /castsequence, /use, or /userandom command is used to select the feedback spell * Sequences actually cycle the item/spell they show feedback for to match the next in seqence. * A new question mark macro icon is available, selecting that will cause the feedback spell/item's icon to be used. Spell Casting * When casting a ranked buff spell that's too high a level for a friendly target the game will automatically use the highest appropriate rank of the spell instead. * Toggleable abilities will have a 1.5 second delay after being cast before they can be cancelled by clicking on them, to prevent accidentally canceling them. You can still right click a buff to cancel it anytime. Logic The way a macro works now is like this: The first set of options are checked. If they are true, then the first spell is cast. If they are false, the next set of options are evaluated, and if true, the next spell is cast, and so on. However, you must keep in mind that only one spell will be cast. As soon as a set of options evaluates to true, the game will cast the corresponding spell, and that line of the macro will be done. The first attempted cast in a macro that fails (for whatever reason - e.g. cooldown not available, out of range, line of sight, nothing to dispel, can't cast harmful spell on friendly taret) will prevent further casts in the macro. Only some of those may be checked in the macro condition. Abilities that do not trigger a global cooldown do not trigger the "no more spells in the macro may cast" rule, provided a /stopcasting follows them. This is true even if the cooldown (trinket or spell) isn't available. Further, these UI errors can be surpressed temporarily in the macro. The /cast, /use, /cancelaura, /changeactionbar, /equip, /target, /focus, /assist, /targetenemy, /targetfriend, /targetparty, and /targetraid commands can be given multiple actions and conditions on which to use those actions. The first matching action will be used. Item names can be used interchangeably with spell names in /cast, /castrandom, and /castsequence Poisons, feeding your pet, etc. will be even easier to macro: /cast Feed Pet then /use Dry Pork Ribs. You will also be able to click on food in your action bar when you are targeting Feed Pet and other item targeting spells. Commands General */cancelaura */focus * # show - Shows macro feedback for the listed spell */stopmacro Action bar */changeactionbar and * /swapactionbar Attacking * /startattack unit * /stopattack Buffs/Auras * /cancelaura name - cancels an aura as if it were right clicked Buttons * /click ButtonName mousebutton Casting */castrandom , , will attempt to cast a randomly selected one of the specified spells */castsequence , , will cast spells sequentially */stopcasting will cancel the spell that is currently being cast Items and Equipment * /equip * /equipslot * /use * /use * /use * /userandom , , will attempt to use a randomly selected one of the specified items Pet control * /petaggressive * /petattack * /petautocaston * /petautocastoff * /petdefensive * /petfollow * /petpassive * /petstay Targeting * /assist * /clearfocus * /cleartarget * /targetlasttarget Target Cycling * /targetenemy * /targetfriend * /targetparty * /targetraid Castsequence It allows you to set up a series of spells to cast one after another, on each subsequent click of the macro. When it gets to the end, it goes back to the beginning. The format is: /castsequence [] reset=<#>/target/combat , , * The reset line can specify a number of seconds after which a sequence resets, or if it should reset on target change or leaving combat. * The sequence tracks the 'next' spell in the sequence until it resets, the next spell only advances on a successful cast. * You can specify a conditional at the start of the command before the reset to filter whether the sequence is used (You cannot use per-spell conditionals) * You can specify items as well as spells * If the spell fails to cast (due to cooldown, out of range, not enough mana, whatever) then the sequence does NOT go to the next spell. The next time you click the macro, it'll try to cast again. (NOTE: A resist, dodge, parry, etc does NOT count as a failed cast. The spell/ability successfully went off, it just missed.) Castsequence Examples: /castsequence Frost Nova, Blink The first time you click it, you Frost Nova, then you click again and Blink away. /castsequence combat Frost Nova, Blink Same as above, but only if you are in combat. /castsequence reset=24 Frost Nova, Blink The first time you click it, you Frost Nova. If you decide not to Blink, after 24 seconds it will reset back to Frost Nova. Since Frost Nova's cooldown also happens to be 24 seconds, it'll be ready to use again. /castsequence Corruption, Immolate, Curse of Agony You can just push that button three times and cast all three DoTs. /castsequence reset=combat/target Corruption, Immolate, Curse of Agony Any time you change targets (like, if the old target is almost dead and you want to start on a new one), or any time you leave combat (perhaps the critter died before you finished casting all the dots), it resets your sequence for you, leaving you ready to start over. Options Note: "," combines options by boolean And; "/" combines by boolean Or; prefacing an option with "no" e.g. "nochanneling" from "channeling", negates it. * actionbar: - Evaluates 'true' if the current actionbar is the same as the listed one. * button:<#> - Evaluates 'true' if the selected button was used to 'click' the spell, defaults to 1 (see below). * channeling: - Evaluates true if you are channeling the spell listed. With no spell listed, it evaluates true if any spell is being channeled. * combat - Evaluates 'true' if you are in combat. * dead - Evaluates 'true' if your target is dead. * equipped:|| - Evaluates 'true' if item is equipped. Item can be any valid inventory slot, item class or item subclass. * exists - Evaluates 'true' if your target exists. * group - evaluates true if you are in a group * group:party/raid - evaluates true if you are in the specified type of group * help - Evaluates 'true' if target is friendly * harm - Evaluates 'true' if target is hostile * indoors, outdoors - Evaluates 'true' if you are indoors or outdoors, respectively. * modifier or modifier:shift|ctrl|alt - Evaluates 'true' if the selected key is held down when the command is executed. * mounted, swimming, flying - Evaluates 'true' if you are mounted, swimming, or flying, respectively. * party - evaluates true if the target is a member of your party * pet: - Evaluates 'true' if the pet exists. Takes pet type (Owl, Bear, Imp) or pet name (Fluffy, MrBigglesworth). With no modifier (i.e. just pet) it evaluates 'true' if ANY pet exists. * raid - evaluates true if the target is a member of your party or raid. * show - Shows macro feedback for the listed spell * stance or stance:# - Evaluates 'true' if you are in a stance, or are in a particular stance (see below) * stealth - Evaluates 'true' if you are stealthed. * target= - Special option. It changes the target from the default of "target" to any valid unitid. (see below) Equipped Option The equipped option also works the same way, but it's a bit trickier. The argument can be either an Inventory Slot (see below), an item type, or an item subtype. For a list of item types and subtypes, check ItemType. A List of Inventory Slots: *Two-Hand *Bag *Shirt *Chest *Back *Feet *Finger *Hands *Head *Held In Off-hand *Legs *Neck *Ranged *Chest *Off Hand *Shoulder *Tabard *Thrown (ranged slot items like thrown daggers) *Trinket *Waist *One-Hand *Main Hand *Off Hand *Wrist Some equipped examples: /cast Swords Mortal Strike; Heroic Strike This will cast Mortal Strike if you are using a 2hand sword. /cast Swords/Two-Handed Maces/Two-Handed Axes/Polearms Mortal Strike This uses the '/' modifier to set up an 'or' condition. This macro will cast Mortal Strike if ANY of those types are equipped. /cast equipped:Shields Shield Bash This will cast Shield Bash if you have a shield equipped. /cast equipped:Daggers Shield Slam This will cast Shield slam only if you have a dagger AND a shield equipped. /cast equipped:Off Hand Rampage This will cast Rampage if you do NOT have a shield equipped, AND you have something in the Off Hand slot. In theory, this macro will only activate if you are dual-wielding. Button Options The option button: works similarly to the modifier button. Normally, if you left-click a button, it performs whatever action is in that spell, in our case a macro. However, if you set the button option, you can change the behavior of a particular macro. The default button is 1, the Left Mouse button. Note that when you activate a macro via a keybinding, it treats it like a Left Mouse button click. The numbered buttons are: 1 or LeftButton 2 or RightButton 3 or MiddleButton 4 or Button4 5 or Button5 ... or any of the buttons remapped by the secure state headers. I don't know what this last bit means, to be honest, I'm simply quoting slouken. /cast button:2,target=player Flash Heal; help Flash Heal This macro would cast Flash Heal on a friendly target, OR if you clicked it with the right mouse button, it would cast Flash Heal on you. Focus Focus is a new feature allowing you to save a target. Example: /focus target ...will save your current target as your focus. This means that you at any time can use /target focus to target the unit you designated with /focus target. Focus supports option parameters. Example macro: /cast target=focus,exists Polymorph /castrandom target=focus,exists Polymorph, Polymorph: Pig, Polymorph: Turtle If you want a random Polymorph This works like your "personal" raid icon which makes it easy to keep track of sheeps etc. Assist Focus # If no focus has been set and the macro is Clicked, you will receive a UI message stating "Unknown Unit." # If you click the macro while holding down the ALT key, your target will receive a white glow around their picture frame. # If you have set your Focus and just Click the macro, you will assist the MT/MA and target his or her target. /focus modifier:alt /stopmacro modifier:alt /assist focus Hover Targeting A feature that i posted my concerns about on the US forums has been saved (but only because Slouken is so freaking awesome). We are talking Hover Targeting, or the ability to dynamically cast spells on different players without having to target them, but by just hovering your mouse cursor over a protected unit frame (in this case a party/raid/target/targettarget unitframe). Example: /cast target=mouseover,exists Healing Touch; Healing Touch ...will cast Healing Touch on the person which unitframe is being hovered over by your mouse, regardsless of your current target. This works with modifier keys and can do different stuff if you are not hovering over a unitframe. Ill give a more advanced macro: /cast target=mouseover,exists,nomodifier:shift/ctrl/alt Swiftmend; target=mouseover,exists,modifier:shift Healing Touch; target=mouseover,exists,modifier:ctrl Rejuvenation; target=mouseover,exists,modifier:alt Regrowth; modifier:ctrl Cat Form; modifier:shift Dire Bear Form; noswimming Travel Form; swimming Aquatic Form ...would cast Swiftmend/Rejuvenation/Regrowth/Healing Touch if your mouse is hovering over a UnitFrame depending on which modifier keys you have pressed down. If your mouse, however, is NOT over a Unit Frame (but some other random place on the screen) it will shapeshift depending on the options you specified. In other words, you will technically have put all your standard healing spells and shapeshifts into a single button who acts differently depending on if your mouse is over a unitframe or not and depending on which modifier keys you use. Modifier Modified clicks by default are not set up to do anything, so that addons can easily extend them. This predates the conversion of the unit frames and action buttons to secure action buttons, so now it's easy to extend them to support modified clicks. /script PlayerFrame:SetAttribute("*type", "target"); ... etc. Shift click defaults to picking up actions from the action bar, so if you want to use the shift key, you'll need to explicitly enable it: /script ActionButton1:SetAttribute("shift-type", "action"); ... etc. It would be very easy to make an addon that does this for all of the unit frames and action buttons. In 2.0.2, the modified clicks work the same as unmodified clicks, but I wanted everyone to know how to do it themselves if they wanted to do it sooner. Remember that for key bindings, SHIFT-N and CTRL-N are already bound by default in the keybinding UI. Stance Options Stances work the same way. If no stance number is given, then it evaluates to 'true' if the player is in any stance. (Note that for Warriors, you are ALWAYS in some stance). If a number is given, it checks to see if that form is currently active. Each class has different numbers for it's stances. Here is a list of stances and their numbers: /cast stance:1 ; stance:2 ; stance:3 Generic Stance Macro: Replace <* Stance Ability> with whatever you want. Paladin Auras are no longer treated as Stances by the Macro Option system. Keep in mind that if you skip a stance (like a Warrior who never does the Defensive Stance quest) then your stance numbers will drop down, i.e. Berserker Stance would be stance 2. Some stance examples. /cast nostance Bear Form If you are not in a form, this will shift you into bear form. /cast stance:1 Overpower; stance:2 Sunder Armor; stance:3 Whirlwind Will cast Overpower in Battle stance, Sunder Armor in Defensive, and Whirlwind in Berserker stance /cast stance:1 Growl; stance:3 Claw Will cast Growl in Bear form, or Claw in Cat form. /cast nostance:3 Cat Form Will put you into cat form if you are not. If you are currently in Cat form, this will NOT shift you out. Target Options The target=unit is a special option. Instead of evaluating to 'true' or 'false', it changes the target of the following spell AND the target of the other options. "Unit" can be any valid unit type, i.e. "player", "target", "targettarget", "party1", "party1target", etc etc. For more on unit types see UnitId. Keep in mind that every spell has a default target of "target". So, for example: /cast help Greater Heal is the same as: /cast help Greater Heal Unless you add in a target=unit option, the default will be your current target. Possible examples of target=unit: /cast target=player Flash Heal This spell will always cast flash heal on yourself. Note that your current target will be unchanged. /cast help Flash Heal; target=targettarget Flash Heal This will cast Flash heal on your target if it is friendly, OR it will cast Flash Heal on your target's target. /cast combat Flash Heal; nocombat Greater Heal; help, combat Flash Heal; target=player Greater Heal This will either 1) Cast flash heal if the target is friendly and you are in combat, 2) cast greater heal if the target is friendly and you are NOT in combat, 3) cast Flash Heal on your target's target if you are in combat and that unit is friendly, or if none of those conditions is true, it will cast Greater Heal on yourself. If you use the unitid "none" it acts as if you had NO target. For example: /cast target=none Dispel Magic This would cast Dispel Magic and then ask for a target, regardless of whom you have targetted currently. Example Macros General Macros Mount /use nomounted,outdoors Black War Steed Bridle This will attempt to mount if you are outside and not mounted. Use Bandage This macro will always use Heavy Netherweave Bandages on yourself, regardless of target. /use target=player Heavy Netherweave Bandages # If you Click the macro while holding down the ALT key, you will bandage yourself. # If you Click the macro while holding down the CTRL key, you will bandage your pet. # If you Click the macro by it self, you will bandage a friendly target. /use modifier:alt,target=player Heavy Runecloth Bandage /use modifier:ctrl,target=pet Heavy Runecloth Bandage /use help Heavy Runecloth Bandage This macro will use a Heavy Runecloth Bandage on your target if you can, yourself otherwise. Unless you hold down ALT, in which case you will always bandage yourself. /use help,modifier:noalt Heavy Runecloth Bandage; target=player Heavy Runecloth Bandage =Macros Pre 2.0= MacrosPre2.0 ---- Go to Macros Go to Interface Customization Category:Macros